package it.softphone.commons.service.security.shiro;

import javax.servlet.ServletRequest;

import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.web.filter.authc.FormAuthenticationFilter;

public class FormAuthcFilter extends FormAuthenticationFilter {

	public FormAuthcFilter() {
	}

	@Override
	protected void setFailureAttribute(ServletRequest request, AuthenticationException ae) {
		super.setFailureAttribute(request, ae);
		
		request.setAttribute( "shiro.exception", ae);
		request.setAttribute( "shiro.exception.message", ae.getMessage());
	}

}
